<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD><TITLE>Tcl_GetVersion manual page - Tcl Library Procedures</TITLE>
<link rel="stylesheet" href="../docs.css" type="text/css" media="all">
</HEAD>
<BODY><H2><a href="../contents.htm">Tcl8.6.11/Tk8.6.11 Documentation</a> <small>&gt;</small> <a href="contents.htm">Tcl C API</a> <small>&gt;</small> GetVersion</H2>
<H3><A HREF="../UserCmd/contents.htm">Tcl/Tk Applications</A> | <A HREF="../TclCmd/contents.htm">Tcl Commands</A> | <A HREF="../TkCmd/contents.htm">Tk Commands</A> | <A HREF="../ItclCmd/contents.htm">[incr Tcl] Package Commands</A> | <A HREF="../SqliteCmd/contents.htm">SQLite3 Package Commands</A> | <A HREF="../TdbcCmd/contents.htm">TDBC Package Commands</A> | <A HREF="../TdbcmysqlCmd/contents.htm">tdbc::mysql Package Commands</A> | <A HREF="../TdbcodbcCmd/contents.htm">tdbc::odbc Package Commands</A> | <A HREF="../TdbcpostgresCmd/contents.htm">tdbc::postgres Package Commands</A> | <A HREF="../TdbcsqliteCmd/contents.htm">tdbc::sqlite3 Package Commands</A> | <A HREF="../ThreadCmd/contents.htm">Thread Package Commands</A> | <A HREF="../TclLib/contents.htm">Tcl C API</A> | <A HREF="../TkLib/contents.htm">Tk C API</A> | <A HREF="../ItclLib/contents.htm">[incr Tcl] Package C API</A> | <A HREF="../TdbcLib/contents.htm">TDBC Package C API</A></H3>
<H3><A NAME="M2">NAME</A></H3>
Tcl_GetVersion &mdash; get the version of the library at runtime
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>#include &lt;tcl.h&gt;</B><BR>
<B>Tcl_GetVersion</B>(<I>major, minor, patchLevel, type</I>)<BR>
<H3><A NAME="M4">ARGUMENTS</A></H3>
<DL class="arguments">
<DT>int <B>*major</B> (out)<DD>
Major version number of the Tcl library.
<P><DT>int <B>*minor</B> (out)<DD>
Minor version number of the Tcl library.
<P><DT>int <B>*patchLevel</B> (out)<DD>
The patch level of the Tcl library (or alpha or beta number).
<P><DT>Tcl_ReleaseType <B>*type</B> (out)<DD>
The type of release, also indicates the type of patch level. Can be
one of <B>TCL_ALPHA_RELEASE</B>, <B>TCL_BETA_RELEASE</B>, or
<B>TCL_FINAL_RELEASE</B>.
<P></DL>
<H3><A NAME="M5">DESCRIPTION</A></H3>
<B>Tcl_GetVersion</B> should be used to query the version number
of the Tcl library at runtime.  This is useful when using a
dynamically loaded Tcl library or when writing a stubs-aware
extension.  For instance, if you write an extension that is
linked against the Tcl stubs library, it could be loaded into
a program linked to an older version of Tcl than you expected.
Use <B>Tcl_GetVersion</B> to verify that fact, and possibly to
change the behavior of your extension.
<P>
<B>Tcl_GetVersion</B> accepts NULL for any of the arguments. For instance if
you do not care about the <I>patchLevel</I> of the library, pass
a NULL for the <I>patchLevel</I> argument.

<H3><A NAME="M6">KEYWORDS</A></H3>
<A href="../Keywords/V.htm#version">version</A>, <A href="../Keywords/P.htm#patchlevel">patchlevel</A>, <A href="../Keywords/M.htm#major">major</A>, <A href="../Keywords/M.htm#minor">minor</A>, <A href="../Keywords/A.htm#alpha">alpha</A>, <A href="../Keywords/B.htm#beta">beta</A>, <A href="../Keywords/R.htm#release">release</A>
<div class="copy">Copyright &copy; 1999 Scriptics Corporation
</div>
</BODY></HTML>
